class Solution {
    public int[] twoSum(int[] price, int target) {
       int len = 0 ; 
       while(len < price.length && price[len] < target){
        len ++ ;
       }
        for(int i = len -1 , j = 0 ; j < i ; ){
           if(price[i]+price[j] == target){
            return new int[]{price[i],price[j]};
           }else if(price[i]+price[j] > target){
            i-- ;
           }else{
             j ++ ;
           }
        }
        return new int[]{};
    }
}